<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>案例3</title>
    <style>
        .content div {
            padding: 5px;
        }
    </style>
</head>
<!-- 179001202 张皓然 -->

<body>
    <div class="content">
        <div><input type="text" id="parm1"></div>
        <div><input type="text" id="parm2"></div>
        <div><input type="button" id="btn" value="传参"></div>
    </div>
    <script>
        let p1 = document.querySelector('#parm1')
        let p2 = document.querySelector('#parm2')
        document.querySelector('#btn').onclick = function() {
            alert(p1.value + '\n' + p2.value)
        }
    </script>

</body>

</html>